package com.bmps.springcloud.insuredmicroservice.model.trail.request;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

import java.io.Serializable;

/**
 * @Author :  zlc
 * @Date : 2019/9/10 11:13
 **/
public class TrailProductModel implements Serializable {

    private int prodInsSeq;

    private String prodName;

    private String prodCode;

    private Integer planVersion;

    private Integer payYear;

    private String payYearFlag;

    private Integer insureYear;

    private String insureYearFlag;

    private Double amnt;

    private Double prem;

    public int getProdInsSeq() {
        return prodInsSeq;
    }

    public void setProdInsSeq(int prodInsSeq) {
        this.prodInsSeq = prodInsSeq;
    }

    public String getProdName() {
        return prodName;
    }

    public void setProdName(String prodName) {
        this.prodName = prodName;
    }

    public String getProdCode() {
        return prodCode;
    }

    public void setProdCode(String prodCode) {
        this.prodCode = prodCode;
    }

    public Integer getPlanVersion() {
        return planVersion;
    }

    public void setPlanVersion(Integer planVersion) {
        this.planVersion = planVersion;
    }

    public Integer getPayYear() {
        return payYear;
    }

    public void setPayYear(Integer payYear) {
        this.payYear = payYear;
    }

    public String getPayYearFlag() {
        return payYearFlag;
    }

    public void setPayYearFlag(String payYearFlag) {
        this.payYearFlag = payYearFlag;
    }

    public Integer getInsureYear() {
        return insureYear;
    }

    public void setInsureYear(Integer insureYear) {
        this.insureYear = insureYear;
    }

    public String getInsureYearFlag() {
        return insureYearFlag;
    }

    public void setInsureYearFlag(String insureYearFlag) {
        this.insureYearFlag = insureYearFlag;
    }

    public Double getAmnt() {
        return amnt;
    }

    public void setAmnt(Double amnt) {
        this.amnt = amnt;
    }

    public Double getPrem() {
        return prem;
    }

    public void setPrem(Double prem) {
        this.prem = prem;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {return true;}

        if (o == null || getClass() != o.getClass()) {return false;}

        TrailProductModel that = (TrailProductModel) o;

        return new EqualsBuilder()
                .append(prodInsSeq, that.prodInsSeq)
                .append(prodName, that.prodName)
                .append(prodCode, that.prodCode)
                .append(planVersion, that.planVersion)
                .append(payYear, that.payYear)
                .append(payYearFlag, that.payYearFlag)
                .append(insureYear, that.insureYear)
                .append(insureYearFlag, that.insureYearFlag)
                .append(amnt, that.amnt)
                .append(prem, that.prem)
                .isEquals();
    }

    @Override
    public int hashCode() {
        return new HashCodeBuilder(17, 37)
                .append(prodInsSeq)
                .append(prodName)
                .append(prodCode)
                .append(planVersion)
                .append(payYear)
                .append(payYearFlag)
                .append(insureYear)
                .append(insureYearFlag)
                .append(amnt)
                .append(prem)
                .toHashCode();
    }

    @Override
    public String toString() {
        return "TrailProductModel{" +
                "prodInsSeq=" + prodInsSeq +
                ", prodName='" + prodName + '\'' +
                ", prodCode='" + prodCode + '\'' +
                ", planVersion=" + planVersion +
                ", payYear=" + payYear +
                ", payYearFlag='" + payYearFlag + '\'' +
                ", insureYear=" + insureYear +
                ", insureYearFlag='" + insureYearFlag + '\'' +
                ", amnt=" + amnt +
                ", prem=" + prem +
                '}';
    }
}
